# coding: utf-8
from marshmallow import Schema, fields
from model.model_base import Base
from sqlalchemy import Column, String


class ResolventList(Base):
    # 问题类型对照表
    __tablename__ = 'ResolventList'
    proid = Column(String(2), primary_key=True, comment='问题id')
    resolid = Column(String(2), primary_key=True, comment='解决方法id')
    resolname = Column(String(50), nullable=False, comment='解决方法名称')
    replace_equipment_flag = Column(String(1), nullable=False, default=0, comment='是否更换设备（0否1是）')
    classifyid = Column(String(2), nullable=False, default=0, comment='设备厂家分类')


class ResolventListSchema(Schema):
    proid = fields.String()
    resolid = fields.String()
    resolname = fields.String()
    replace_equipment_flag = fields.String()
    classifyid = fields.String()


resolventListSchema = ResolventListSchema()
